package lumingweihua.future.cn.lumingweihua.home.domain;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by Administrator on 2018/3/3.
 */

public class HuoyuanListData implements Serializable {
    private String id;
    private String avatar_url;
    private String loading;
    private String unload;
    private String type;//货物类型
    private String weight;//总重量
    private String surplus_weight;//剩余重量
    private String use_time;//用车时间
    private String state;//1已发出邀请 2未发出
    private String isself;//1自己发布的
    private String linkname;//名称
    private String transportation;//运费
    private String is_plat;//是否是平台的
    private String fast;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getImg_path() {
        return avatar_url;
    }

    public void setImg_path(String img_path) {
        this.avatar_url = img_path;
    }

    public String getStartCity() {
        return loading;
    }

    public String getStartCity2() {
        try {
            if(loading!=null && loading.contains("省"))
                return loading.substring(loading.indexOf("省")+1);
        		} catch (Exception e) {
        			// TODO: handle exception
        		}

        return loading;
    }

    public void setStartCity(String startCity) {
        this.loading = startCity;
    }

    public String getEndCity() {
        return unload;
    }

    public String getEndCity2() {
        try {
            if(unload!=null && unload.contains("省"))
                return unload.substring(unload.indexOf("省")+1);
        } catch (Exception e) {
            // TODO: handle exception
        }

        return unload;
    }

    public void setEndCity(String endCity) {
        this.unload = endCity;
    }

    public String getGoods_type() {
        if(type == null)
            return "";
        return type;
    }

    public void setGoods_type(String goods_type) {
        this.type = goods_type;
    }

    public String getTotal_weight() {
        if(TextUtils.isEmpty(weight))
            return "0";
        return weight;
    }

    public void setTotal_weight(String total_weight) {
        this.weight = total_weight;
    }

    public String getRemain_weight() {
        if(TextUtils.isEmpty(surplus_weight))
            return "0";
        return surplus_weight;
    }

    public void setRemain_weight(String remain_weight) {
        this.surplus_weight = remain_weight;
    }

    public String getTime() {
        return use_time;
    }

    public void setTime(String time) {
        this.use_time = time;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public boolean getIsself() {
        return "1".equals(isself);
    }

    public void setIsself(String isself) {
        this.isself = isself;
    }

    public String getLinkname() {
        return linkname==null?"":linkname;
    }

    public void setLinkname(String linkname) {
        this.linkname = linkname;
    }

    public String getTransportation() {
        return transportation==null?"0":transportation;
    }

    public void setTransportation(String transportation) {
        this.transportation = transportation;
    }

    public boolean getIs_plat() {
        return "1".equals(is_plat);
    }

    public void setIs_plat(String is_plat) {
        this.is_plat = is_plat;
    }

    public boolean getJiaji() {
        return "1".equals(fast);
    }

    public void setJiaji(String jiaji) {
        this.fast = jiaji;
    }
}
